﻿using System;
using Framework.Poco;
using Shell.DomainDot;

namespace Framework.Domain
{
    /// <summary>
    /// 文章分类删除器
    /// </summary>
    public class DeleteCategory : DomainDotBase
    {        
        /// <summary>
        /// 所有的文章分类
        /// </summary>
        public WithAll<Category> Categories { get; set; }

        /// <summary>
        /// 删除分类
        /// </summary>
        public void Delete(Guid identity)
        {
            this.Categories.Delete(identity);
            this.Categories.Submit();
        }
    }
}
